package com.ydh.company.advice;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


/*谢凯是一个大傻逼*/
@Component
@Aspect
public class LogAdvice {


    private Logger logger = LoggerFactory.getLogger(LogAdvice.class);

    @Pointcut("@annotation(com.ydh.company.annotation.MyLog)")
    public void pointcut(){
    }

    @Before("pointcut()")
    public void before(){
        logger.info("被切到了");
    }
}
